import 'package:share_fit/app/controllers/base/base_controller.dart';
import 'package:share_fit/app/ute/uteped_const.dart';

import 'weather_setting_state.dart';

class WeatherSettingLogic extends BaseController {
  static const isWeatherSync = "isWeatherSync";
  final WeatherSettingState state = WeatherSettingState();

  void setWeatherSyncEnable(value) {
    state.isWeatherSync.value = value;
    save(isWeatherSync, value);
  }

  @override
  String getRemotePath() {
    return UTEPedConst.pathDeviceOptions;
  }

  @override
  String getStoragePath() {
    return UTEPedConst.pathDevice;
  }

  @override
  void initState() {
    state.isWeatherSync.value = read(isWeatherSync, defaultValue: false);
  }

  @override
  void onRemoteEvent(event, method) {
    // TODO: implement onRemoteEvent
  }
}
